﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace DevelopTools.UI
{
    /// <summary>
    /// UI元素
    /// </summary>
    //[RequireComponent(typeof(UIText))]
    public class UIElement : MonoBehaviour
    {
        //UI上文字组件
        public UIText uiText;

        //UI的动画控制 
        public UGUISpriteAnimation uiAnim;

        //UI的运动缩放控制
        public UIMotion uiMotion;

        //UI的事件控制
        public UIAction uiAction;
        // Use this for initialization
        void Awake()
        {
            uiText = GetComponent<UIText>();
        }

        // Update is called once per frame
        void Update()
        {
            DoUIFuction();
        }
        public void DoUIFuction()
        {
            if (uiText !=null)
            {
                uiText.UpdateText();
            }
        }

    }
}